PROGRAM = c2demo.exe

# Codec2 demo Makefile

# uncomment under Windows
CC_PREFIX = 
# uncomment under Linux (to cross-compile for Windows)
# CC_PREFIX = i586-mingw32msvc-

CFLAGS  = -mno-cygwin

LIBS    = -mno-cygwin -mwindows -lcomctl32 -lwinmm

SRCS = c2demo.c
OBJS = c2demo.o c2lib.lib c2demo.res
HDRS = resource.h codec2.h

all: $(PROGRAM)

$(PROGRAM): $(OBJS)
	$(CC_PREFIX)gcc -o $(PROGRAM) $(OBJS) $(LIBS)
	strip $(PROGRAM)

%.o: %.c $(HDRS)
	$(CC_PREFIX)gcc -c $(SRCS)

%.res : %.rc $(HDRS) $(DL_FILE)
	$(CC_PREFIX)windres --use-temp-file -O coff $< $@

clean:
	rm -f $(PROGRAM)
	rm -f *.res *.o
